package com.example.wenmini.entity;

import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
public class Questionnaire {
    private Long id;
    private String title;
    private String url;
    private String structure;
    private String description;
    private LocalDateTime publishedAt;
    private List<Question> questions;
    private QuestionConfig questionConfigs;

    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;
    private Boolean active = true;

    @Data
    public static class QuestionConfig {
        private List<QuestionItem> questions;

        @Data
        public static class QuestionItem {
            private QuestionType type;
            private List<OptionConfig> options;
            private List<String> textAnswers;
        }

        @Data
        public static class OptionConfig {
            private Integer optionIndex;
            private Integer percentage;
        }
    }


}